<?php
@header("content-type:text/html;charset=utf-8");
@header("Access-Control-Allow-Origin:*");
mysql_connect("localhost:3306","root","root");
mysql_select_db("1904");
mysql_query("set character set utf8");
mysql_query("set names utf8");
    $user_name=$_GET["user_name"];
    $sql="select * from userinfo where user_name='$user_name'";
    $result=mysql_query($sql);
    $arr=array();
    if(mysql_fetch_assoc($result)){
    $arr["status"]=false;
    $arr["msg"]="用户名重复";
    }
    else{
    $arr["status"]=true;
    $arr["msg"]="";
    }  
echo json_encode($arr)
?>